From: Sebastian Kemper Date: Thu, 4 Jan 2018 15:34:36 +0000 (+0100) Subject: freeswitch-stable: add FreeTDM support X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=70a99e695b9d18b557a9e66c6598ec709c8e4011;p=feed%2Ftelephony.git freeswitch-stable: add FreeTDM support The OpenWrt telephony feed already has DAHDI support. This commit enables FreeTDM so FreeSWITCH can make use of DAHDI via libpri. This does not change the existing FreeSWITCH packages as FreeTDM is a separate library in the FreeSWITCH distribution, hence no revision bump. Signed-off-by: Sebastian Kemper --- diff --git a/net/freeswitch-stable/Makefile b/net/freeswitch-stable/Makefile index eaffe8d..347e83d 100644 --- a/net/freeswitch-stable/Makefile +++ b/net/freeswitch-stable/Makefile @@ -241,6 +241,8 @@ FS_STABLE_MOD_AVAILABLE:= \ yaml \ yuv +LIBFTDM:=libfreetdm + PKG_CONFIG_DEPENDS:= \ $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-%,$(FS_STABLE_MISC_AVAILABLE)) \ $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_STABLE_MOD_AVAILABLE)) \ @@ -257,6 +259,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_FS_STABLE_WITH_VPX \ CONFIG_FS_STABLE_WITH_ZRTP \ CONFIG_LIBC \ + CONFIG_PACKAGE_$(LIBFTDM) \ CONFIG_SOFT_FLOAT include $(INCLUDE_DIR)/package.mk @@ -311,6 +314,24 @@ define Package/$(PKG_NAME)/install/mod $(1)$(FS_STABLE_MOD_DIR) endef +define Package/$(LIBFTDM) + CATEGORY:=Libraries + DEPENDS:=$(PKG_NAME) + SECTION:=libs + SUBMENU:=Telephony + TITLE:=TDM signaling and media API + URL:=https://www.$(PRG_NAME).org +endef + +define Package/$(LIBFTDM)/description +Provides a unified interface to hardware TDM cards and ss7 stacks for +FreeSWITCH. +endef + +define Package/$(LIBFTDM)/install +$(call Package/$(PKG_NAME)/install/lib,$(1),$(LIBFTDM)) +endef + define Package/$(PKG_NAME)/config source "$(SOURCE)/Config.in" endef @@ -922,6 +943,12 @@ endef define Build/Compile $(call Build/Compile/Default) +# FreeTDM is only compiled/installed automatically if mod_freetdm is selected +ifneq ($(CONFIG_PACKAGE_$(LIBFTDM)),) +ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) + $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/freetdm) +endif +endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod) endif @@ -932,6 +959,11 @@ endef define Build/Install $(call Build/Install/Default) +ifneq ($(CONFIG_PACKAGE_$(LIBFTDM)),) +ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-freetdm),) + $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/freetdm install) +endif +endif ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),) $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install) endif @@ -948,8 +980,15 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \ $(1)$(FS_STABLE_PKGCONFIG_DIR) +ifneq ($(CONFIG_PACKAGE_$(LIBFTDM)),) + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/freetdm.pc \ + $(1)$(FS_STABLE_PKGCONFIG_DIR) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include +endif endef +$(eval $(call BuildPackage,$(LIBFTDM))) $(eval $(call BuildPackage,$(PKG_NAME))) $(eval $(call BuildPackage,$(PKG_NAME)-misc-hotplug)) $(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl)) diff --git a/net/freeswitch-stable/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch b/net/freeswitch-stable/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch new file mode 100644 index 0000000..7e29e94 --- /dev/null +++ b/net/freeswitch-stable/patches/280-tone-down-freetdm-COMP_VENDOR_CFLAGS.patch @@ -0,0 +1,11 @@ +--- a/libs/freetdm/configure.ac ++++ b/libs/freetdm/configure.ac +@@ -88,7 +88,7 @@ AC_ARG_ENABLE([enable_64], + + case "${ax_cv_c_compiler_vendor}" in + gnu) +- COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0" ++ COMP_VENDOR_CFLAGS="-ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" + ;; + sun) + COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -xvpara"